﻿<UserControl x:Class="Albatross.SampleClient.Views.ContactsView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
			 xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
			 xmlns:commonViews="clr-namespace:Albatross.WPF.Common.Views;assembly=Albatross.WPF.Common"
			 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
	<UserControl.Resources>
		<ResourceDictionary Source="Common.xaml"/>
	</UserControl.Resources>
	<DockPanel>
		<TextBlock Text="{Binding Title}" Style="{StaticResource header}" DockPanel.Dock="Top"/>
		<ToolBar Style="{StaticResource toolbar}" DockPanel.Dock="Top">
			<Button Command="{Binding RefreshCommand}">Refresh</Button>
			<Separator/>
			<Button Command="{Binding DeleteCommand}">Delete</Button>
		</ToolBar>
		<DataGrid ItemsSource="{Binding Contacts}" AutoGenerateColumns="False" Style="{StaticResource datagrid}" x:Name="Grid">
			<i:Interaction.Behaviors>
				<commonViews:SelectionChangedCommand Command="{Binding SelectedContactChangedCommand}" />
			</i:Interaction.Behaviors>
			<DataGrid.Columns>
				<DataGridTextColumn Binding="{Binding ID}" Header="ID" Width="Auto"/>
				<DataGridTextColumn Binding="{Binding FirstName}" Header="First Name" Width="1*"/>
				<DataGridTextColumn Binding="{Binding LastName}" Header="Last Name" Width="1*"/>
				<DataGridTextColumn Binding="{Binding CellPhone}" Header="Cell Phone" Width="1*"/>
			</DataGrid.Columns>
		</DataGrid>
	</DockPanel>
</UserControl>
